﻿
using System; 
using System.Text;
using System.Collections.Generic; 
using System.Data;
using Kevin.Framework.Data.OrmMapping;
using Kevin.Framework.Validation;
/*------------------------------------------------------------------------
   苏州捷安信息科技有限公司 版权所有			
   文件名: TU_User.cs
   作 者 : 席吉波
   日 期 : 2012-10-16
   备 注 : 当您对本文件更改时请写明修改人、修改日期以及事由
  ------------------------------------------------------------------------
*/
namespace JOIN.Rights.Model{
	 	//TU_User
		[Serializable]
	[TableMapping("TU_User")]
	public class UserInfo : EntityBase
	{
		#region Constructor
		
		public UserInfo()
			:this("")
		{}
		public UserInfo(string connectionKey)
			:base(connectionKey)
		{}
		
		#endregion
   		
      			
		private string _userid;     
		/// <summary>
		/// 用户ID
        /// </summary>		
		[FieldMapping("UserID" )]		
		[NotNullValidator(MessageTemplate="用户ID不能为空")]
				public string UserID
        {
            get
            { 
            	return _userid; 
            }
            set
            { 
            	if(_userid != value)
            	{            	
            		base.OnPropertyChanged("UserID", _userid, value);
            		_userid = value; 
            	}
            }
        }        
				
		private string _userno;     
		/// <summary>
		/// 用户帐号
        /// </summary>		
		[FieldMapping("UserNO" )]		
		[NotNullValidator(MessageTemplate="用户帐号不能为空")]
				public string UserNO
        {
            get
            { 
            	return _userno; 
            }
            set
            { 
            	if(_userno != value)
            	{            	
            		base.OnPropertyChanged("UserNO", _userno, value);
            		_userno = value; 
            	}
            }
        }        
				
		private string _userpwd;     
		/// <summary>
		/// 用户密码
        /// </summary>		
		[FieldMapping("UserPwd" )]		
		[NotNullValidator(MessageTemplate="用户密码不能为空")]
				public string UserPwd
        {
            get
            { 
            	return _userpwd; 
            }
            set
            { 
            	if(_userpwd != value)
            	{            	
            		base.OnPropertyChanged("UserPwd", _userpwd, value);
            		_userpwd = value; 
            	}
            }
        }        
				
		private string _username;     
		/// <summary>
		/// 用户姓名
        /// </summary>		
		[FieldMapping("UserName" )]		
		[NotNullValidator(MessageTemplate="用户姓名不能为空")]
				public string UserName
        {
            get
            { 
            	return _username; 
            }
            set
            { 
            	if(_username != value)
            	{            	
            		base.OnPropertyChanged("UserName", _username, value);
            		_username = value; 
            	}
            }
        }        
				
		private bool _usersex;     
		/// <summary>
		/// 性别
        /// </summary>		
		[FieldMapping("UserSex" )]		
				public bool UserSex
        {
            get
            { 
            	return _usersex; 
            }
            set
            { 
            	if(_usersex != value)
            	{            	
            		base.OnPropertyChanged("UserSex", _usersex, value);
            		_usersex = value; 
            	}
            }
        }        
				
		private string _userphone;     
		/// <summary>
		/// 联系电话
        /// </summary>		
		[FieldMapping("UserPhone" )]		
				public string UserPhone
        {
            get
            { 
            	return _userphone; 
            }
            set
            { 
            	if(_userphone != value)
            	{            	
            		base.OnPropertyChanged("UserPhone", _userphone, value);
            		_userphone = value; 
            	}
            }
        }        
				
		private string _useraddress;     
		/// <summary>
		/// 住址
        /// </summary>		
		[FieldMapping("UserAddress" )]		
				public string UserAddress
        {
            get
            { 
            	return _useraddress; 
            }
            set
            { 
            	if(_useraddress != value)
            	{            	
            		base.OnPropertyChanged("UserAddress", _useraddress, value);
            		_useraddress = value; 
            	}
            }
        }        
				
		private string _useremail;     
		/// <summary>
		/// 电子邮件
        /// </summary>		
		[FieldMapping("UserEmail" )]		
				public string UserEmail
        {
            get
            { 
            	return _useremail; 
            }
            set
            { 
            	if(_useremail != value)
            	{            	
            		base.OnPropertyChanged("UserEmail", _useremail, value);
            		_useremail = value; 
            	}
            }
        }        
				
		private int _userstate;     
		/// <summary>
		/// 帐号状态(0:正常使用,1:锁定)
        /// </summary>		
		[FieldMapping("UserState" )]		
				public int UserState
        {
            get
            { 
            	return _userstate; 
            }
            set
            { 
            	if(_userstate != value)
            	{            	
            		base.OnPropertyChanged("UserState", _userstate, value);
            		_userstate = value; 
            	}
            }
        }        
		   
	}
}